package cn.edu.nchu.comic_strip.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.io.Serializable;

/**
 * @className: PageDao
 * @description: TODO 类描述
 * @author: Kuangkeli
 * @date: 2024/05/24 18:34
 **/
@Entity(tableName = "page")
public class Page implements Serializable {
    @PrimaryKey(autoGenerate = true)
    private int id;
    /**
     * 连环画图像资源编号
     */
    @ColumnInfo(name = "image_id")
    private String imageResId;

    @ColumnInfo(name = "book_id")
    private int bookId;
    @ColumnInfo(name = "book_name")
    private String bookName;

    @ColumnInfo(name = "title")
    private String title;

    @ColumnInfo(name = "summary")
    private String summary;

    @ColumnInfo(name = "page_num")
    private int pageNum;
    @ColumnInfo(name = "is_collection",defaultValue = "0")
    private int isCollection;

    @ColumnInfo(name = "is_bookmark",defaultValue = "0")
    private int isBookmark;


    public Page(String imageResId, int bookId, String bookName, String title, String summary, int pageNum) {
        this.imageResId = imageResId;
        this.bookId = bookId;
        this.bookName = bookName;
        this.title = title;
        this.summary = summary;
        this.pageNum = pageNum;
    }

    @Override
    public String toString() {
        return "Page{" +
                "id=" + id +
                ", imageResId=" + imageResId +
                ", bookId=" + bookId +
                ", bookName='" + bookName + '\'' +
                ", title='" + title + '\'' +
                ", summary='" + summary + '\'' +
                ", pageNum=" + pageNum +
                ", isCollection=" + isCollection +
                ", isBookmark=" + isBookmark +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getImageResId() {
        return imageResId;
    }

    public void setImageResId(String imageResId) {
        this.imageResId = imageResId;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getIsCollection() {
        return isCollection;
    }

    public void setIsCollection(int isCollection) {
        this.isCollection = isCollection;
    }

    public int getIsBookmark() {
        return isBookmark;
    }

    public void setIsBookmark(int isBookmark) {
        this.isBookmark = isBookmark;
    }
}